package com.yuqiao.read.design.factory;

public class SimplePizzaFactory {

    public Pizza createPizza(String type){
        Pizza pizza =null;

        if ("cheese".equals(type)) {
            pizza = new CheeasePizza();
        } else if ("pepperoni".equals(type)) {
            pizza = new PepPeroniPizza();
        } else if ("clam".equals(type)) {
            pizza = new ClamPizza();
        } else if ("veggie".equals(type)) {
            pizza = new VeggiePizza();
        }
        return pizza;
    }

}
